Function RGB(red,green,blue)
Return ((red & 255) Shl 12) | ((green & 255) Shl 8) | ((blue & 255) Shl 4)
End Function 

Function ARGB(alpha,red,green,blue)
Return ((alpha & 255) Shl 24) | ((red & 255) Shl 16) | ((green & 255) Shl 8) | (blue & 255)
End Function 

Function IntToRGBA:Int[]( Value:Int )
	Local rgba:Int[4]
	rgba[3] = ( Value Shr 24 ) & $FF
	rgba[0] = ( Value Shr 16) & $FF
	rgba[1] = ( Value Shr 8) & $FF
	rgba[2] = Value & $FF
	Return rgba
End Function


